/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.service.user;

import java.util.List;

import com.idenger.common.service.CrudService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.idenger.common.persistence.Page;
import com.idenger.modules.edu.entity.user.EduUser;
import com.idenger.modules.edu.dao.user.EduUserDao;

/**
 * 用户Service
 * @author 兰正军
 * @version 2017-12-01
 */
@Service
@Transactional(readOnly = true)
public class EduUserService extends CrudService<EduUserDao, EduUser> {

	public EduUser get(String id) {
		return super.get(id);
	}
	
	public List<EduUser> findList(EduUser eduUser) {
		return super.findList(eduUser);
	}
	
	public Page<EduUser> findPage(Page<EduUser> page, EduUser eduUser) {
		return super.findPage(page, eduUser);
	}
	
	@Transactional(readOnly = false)
	public void save(EduUser eduUser) {
		super.save(eduUser);
	}
	
	@Transactional(readOnly = false)
	public void delete(EduUser eduUser) {
		super.delete(eduUser);
	}
	
	public EduUser findByAccount(EduUser eduUser){
		return dao.findByAccount(eduUser);
	}
	
	public EduUser getByPhone(EduUser eduUser){
		return dao.getByPhone(eduUser);
	}
	
	public EduUser getByIdCard(EduUser eduUser){
		return dao.getByIdCard(eduUser);
	}
	
	@Transactional(readOnly = false)
	public void physicaDel(EduUser eduUser){
		dao.physicaDel(eduUser);
	}
	
	public EduUser findByOpenId(String openId){
		return dao.findByOpenId(openId);
	}
	
	@Transactional(readOnly = false)
	public void updatePwd(EduUser eduUser){
		dao.updatePwd(eduUser);
	}
	@Transactional(readOnly = false)
	public void updatePhone(EduUser eduUser){
		dao.updatePhone(eduUser);
	}
	
	public List<EduUser> findListByDetails(EduUser eduUser) {
		return dao.findListByDetails(eduUser);
	}
	
	public Page<EduUser> findListByDetails(Page<EduUser> page, EduUser eduUser) {
		return super.findListByDetails(page, eduUser);
	}
	
	public String userCount(){
		return dao.userCount();
	}
	
}